// 引入mongoose
const mongoose = require('mongoose')
// 创建Schema
const Schema = mongoose.Schema

const RolesSchema = new Schema({
    // 角色标题
    title: {
        type: String,
        required: true,
    },
    // 角色描述
    describe: {
        type: String,
        required: true,
    },
    // 角色权限
    permissions:{
        type:Array,
        default:[]
    }
})

module.exports = Roles = mongoose.model('roles', RolesSchema)
